
<tr valign="top">
    <td height="50" align="left" class="dato" background="/images/topHeader.gif" colspan="4">Participantes por Eventos</td>
</tr>
  <tr>
     <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos">Indice</td>
  </tr>
    <tr><td>&nbsp;</td></tr>


<table border="0">
<% for event in Event.find(:all) %>
<% @currentcategory = Category.find(event.category_idf) %>
    <tr align="center">
	<td colspan="5">(<%= @currentcategory.name %>)</td>
	</tr>
	
	<tr align="center">
  	<td colspan="4"><h2><%= event.name %></h2></td>
	<td><h2><%= event.eventstart.strftime("%d-%b") %></h2></td>
	</tr>
	
    <tr align="center">
    <td width="20">&nbsp;</td>
    <td width="150">Participante</td>
    <td width="68">Proporcion</td>
	<td width="68">Casa/Visitante</td>
	<td width="68">Score</td>
	</tr>	
	
<% for eventparticipant in Eventparticipant.find_all_by_event_idf(event.id) %>
    <% @participant=Participant.find_by_id(eventparticipant.participant_idf)  %>

	<tr align="center">
    <td width="20"><%= image_tag(@participant.image,  :size => "60x60", :align => "middle" ) %></td>
    <td width="150"><strong><%= link_to @participant.name, edit_eventparticipant_path(eventparticipant),  :class => "navbar" %></strong></td>
	<td width="68"><%= eventparticipant.proportion%></td>
	<td width="68"><%= eventparticipant.homevisitant%></td>
	
		<td width="68"><%= eventparticipant.score%></td>
		</tr>

	
	<% if(eventparticipant.homevisitant=='casa') %>
	<tr align="center">
	<td><%= link_to "Finalizar", "/events/finalizar/"+event.id.to_s, :class => "navbar" %></td>
	 </tr>
	 <% end %>
	 
<% end %>

<tr><td bgcolor="#666666" colspan="5">&nbsp;</td></tr>

<% end %>